LevelBar: Really fix underallocation of blocks
authorDaniel Boles <dboles@src.gnome.org>
Sat, 12 Aug 2017 15:13:11 +0000 (16:13 +0100)
committerDaniel Boles <dboles@src.gnome.org>
Mon, 28 Aug 2017 23:34:02 +0000 (00:34 +0100)
commit87c67e6ed308f3e287feda1237bf7cba899304e0
tree030671029f42b16bc9d182a3b180ff5a1377be7d
parentbc3968d2ff02ded9726b07d0cff30b1ea933b67d
LevelBar: Really fix underallocation of blocks

Themes should not enforce min sizes on blocks in continuous mode; in
this case, the filled block should be as large as it needs to be to
reflect the current value, and no larger or smaller than that. So, the
fact that the minimal size was selected on just levelbar block is wrong:
we should also require the levelbar.discrete class to apply min sizes.

The widget should enforce whatever correct minimum size results from the
above fix, by reapplying commit 78b4885fe8850e132d8bb06df8ab90ac6c2033e0

Except: we should not allocate/draw the filled block if the value is 0,
as in this case, the LevelBar should be empty, not have a min-size fill.

This partially reverts commit 96062ffeae5245fa165a96a2af86d5645f5e8569,
as it makes sense to set min sizes for discrete blocks, so keep that in.

https://bugzilla.gnome.org/show_bug.cgi?id=783649
gtk/gtklevelbar.c
gtk/theme/Adwaita/_common.scss
gtk/theme/Adwaita/gtk-contained-dark.css
gtk/theme/Adwaita/gtk-contained.css
gtk/theme/HighContrast/_common.scss
gtk/theme/HighContrast/gtk-contained-inverse.css
gtk/theme/HighContrast/gtk-contained.css